namespace Management.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class CreatedTablesAboutSiliconCutting : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Breakeds",
                c => new
                    {
                        BreakedID = c.Int(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                        IsDisabled = c.Int(nullable: false),
                        Created_at = c.DateTime(nullable: false),
                        Updated_at = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.BreakedID);
            
            CreateTable(
                "dbo.SiliconCarbides",
                c => new
                    {
                        SiliconCarbideID = c.Int(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                        IsDisabled = c.Int(nullable: false),
                        Created_at = c.DateTime(nullable: false),
                        Updated_at = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.SiliconCarbideID);
            
            CreateTable(
                "dbo.SiliconCuttings",
                c => new
                    {
                        SiliconCuttingID = c.Int(nullable: false, identity: true),
                        WorkshopID = c.Int(nullable: false),
                        WireNum = c.String(),
                        CuttingID = c.Int(nullable: false),
                        CuttingNum = c.String(),
                        CuttingBlock = c.Single(nullable: false),
                        CuttingLength = c.Single(nullable: false),
                        BottomMaterialLength = c.Single(nullable: false),
                        CuttingSpecification = c.Int(nullable: false),
                        CuttingThickness = c.Int(nullable: false),
                        CuttingType = c.String(),
                        SteelWireID = c.Int(nullable: false),
                        SlotPitch = c.Int(nullable: false),
                        SiliconCarbideID = c.Int(nullable: false),
                        SuspensionID = c.Int(nullable: false),
                        PulpDensityStart = c.Single(nullable: false),
                        PulpDensityEnd = c.Single(nullable: false),
                        PulpUpdateCount = c.Single(nullable: false),
                        GuideNum = c.Int(nullable: false),
                        IsBreaked = c.Int(nullable: false),
                        BreakedID = c.Int(nullable: false),
                        IsScrap = c.Int(nullable: false),
                        IsTest = c.Int(nullable: false),
                        CleaningEquipmentNum = c.String(),
                        Pre_CleaningEquipmentNum = c.String(),
                        CuttingTeamID = c.Int(nullable: false),
                        CleaningTeamID = c.Int(nullable: false),
                        PastingTeamID = c.Int(nullable: false),
                        PlubTeamID = c.Int(nullable: false),
                        Remark = c.String(),
                        LevelOneCount = c.Int(nullable: false),
                        LevelTwoCount = c.Int(nullable: false),
                        LevelThreeCount = c.Int(nullable: false),
                        QualifiedCount = c.Int(nullable: false),
                        UnqualifiedCount = c.Int(nullable: false),
                        DebrisWeight = c.Single(nullable: false),
                        SumCount = c.Int(nullable: false),
                        QualifiedRate = c.String(),
                        Handler = c.String(),
                        LevelOneTheoreticalCount = c.Int(nullable: false),
                        SpotCheckCount = c.Int(nullable: false),
                        SpotCheckUnqualifiedCount = c.Int(nullable: false),
                        SpotCheckRemark = c.String(),
                        IsCheck = c.Int(nullable: false),
                        Checker = c.String(),
                        IsSpotCheck = c.Int(nullable: false),
                        SpotChecker = c.String(),
                        EmployeeNum = c.String(),
                        CuttingDate = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.SiliconCuttingID);
            
            CreateTable(
                "dbo.SteelWires",
                c => new
                    {
                        SteelWireID = c.Int(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                        IsDisabled = c.Int(nullable: false),
                        Created_at = c.DateTime(nullable: false),
                        Updated_at = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.SteelWireID);
            
            CreateTable(
                "dbo.Suspensions",
                c => new
                    {
                        SuspensionID = c.Int(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                        IsDisabled = c.Int(nullable: false),
                        Created_at = c.DateTime(nullable: false),
                        Updated_at = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.SuspensionID);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.Suspensions");
            DropTable("dbo.SteelWires");
            DropTable("dbo.SiliconCuttings");
            DropTable("dbo.SiliconCarbides");
            DropTable("dbo.Breakeds");
        }
    }
}
